Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@smithy/eventstream-codec

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/eventstream-codec

[![NPM version](https://img.shields.io/npm/v/@smithy/eventstream-codec/latest.svg)](https://www.npmjs.com/package/@smithy/eventstream-codec) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/eventstream-codec.svg)](https://www.npmjs.com/package/@smi

  • 3.1.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11M
increased by1.53%
Maintainers
2
Weekly downloads
 
Created

What is @smithy/eventstream-codec?

@smithy/eventstream-codec is an npm package designed to handle the encoding and decoding of event streams. It is part of the Smithy framework, which is used for building SDKs and other tools for AWS services. This package is particularly useful for working with AWS services that use event streams, such as AWS Transcribe or AWS Kinesis.

What are @smithy/eventstream-codec's main functionalities?

Encoding Event Streams

This feature allows you to encode an event stream into a binary format. The code sample demonstrates how to create an event and encode it using the EventStreamMarshaller.

const { EventStreamMarshaller } = require('@smithy/eventstream-codec');
const marshaller = new EventStreamMarshaller();
const event = { headers: {}, body: Buffer.from('example data') };
const encoded = marshaller.marshall(event);
console.log(encoded);

Decoding Event Streams

This feature allows you to decode a binary event stream back into its original format. The code sample shows how to decode an encoded event using the EventStreamMarshaller.

const { EventStreamMarshaller } = require('@smithy/eventstream-codec');
const marshaller = new EventStreamMarshaller();
const encoded = Buffer.from('example encoded data');
const event = marshaller.unmarshall(encoded);
console.log(event);

Other packages similar to @smithy/eventstream-codec

FAQs

Package last updated on 21 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc